from django.db import models


# Create your models here.
class Author(models.Model):
    username = models.CharField(max_length=20)
    password = models.CharField(max_length=80)

    class Meta:
        db_table = 'author'

class Books(models.Model):
    title=models.CharField(max_length=20)
    content=models.TextField()
    author=models.ForeignKey(Author,on_delete=models.SET_NULL,null=True)
    class Meta:
        db_table='books'
